home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / WWW / Charon / Install_Charon < prev    next >
Text File  |  2000-04-19  |  3KB  |  127 lines

  1. ; Charon install script 1.2 (19.4.2000)
  2. ;
  3. ; ©2000 Andrija Antonijevic
  4. ;
  5.  
  6. (set #exec (/ (getversion) 65536))
  7. (if (< #exec 39)
  8.     (abort "Charon needs at least OS3.0 to work.\n")
  9. )
  10.  
  11. (if (not (exists "MUI:Libs/MUI/NList.mcc"))
  12.     (abort "You don't seem to have NList MUI custom class installed.\n"
  13.             "This class in necessary for Charon to work. You can "
  14.             "get this class from Aminet "
  15.             "(currently dev/mui/MCC_NList0_89.lha)"
  16.     )
  17. )
  18.  
  19. (complete 0)
  20.  
  21. (set #source-dir
  22.     (if (= 1 (exists @icon))
  23.         (pathonly (expandpath @icon))
  24.     ;else
  25.         (expandpath @icon)
  26.     )
  27. )
  28.  
  29. (set @default-dest
  30.     (askdir
  31.         (prompt "Select the directory where you want to "
  32.                 "install Charon. A directory named Charon WILL "
  33.                 "be created and all files will be copied there."
  34.         )
  35.         (help @askdir-help)
  36.         (default @default-dest)
  37.     )
  38. )
  39.  
  40. (set @default-dest (tackon @default-dest "Charon"))
  41.  
  42. (set #ToolbarType
  43.     (askchoice
  44.         (prompt "What kind of screen will you be using Charon on?")
  45.         (help "Charon uses images for its toolbar. In order to make "
  46.               "images look as good as possible, there are three "
  47.               "versions of them for different screen resolutions."
  48.         )
  49.         (choices "2:1 (640x256 and similar)" "1:1 (640x512)" "1:1 higher resolutions (800x600 etc)")
  50.     )
  51. )
  52.  
  53. (if (= #ToolbarType 0) (set #ImageDir (tackon #source-dir "Images")))
  54. (if (= #ToolbarType 1) (set #ImageDir (tackon #source-dir "Images_640x512")))
  55. (if (= #ToolbarType 2) (set #ImageDir (tackon #source-dir "Images_800x600")))
  56.  
  57. (if (not (exists @default-dest))
  58.     (makedir @default-dest (infos))
  59. )
  60.  
  61. (complete 20)
  62.  
  63. (makedir (tackon @default-dest "Backup"))
  64. (makedir (tackon @default-dest "Config"))
  65. (makedir (tackon @default-dest "Images"))
  66.  
  67. (copyfiles
  68.     (source (tackon #source-dir "Doc"))
  69.     (dest (tackon @default-dest "Doc"))
  70.     (infos)
  71.     (all)
  72. )
  73.  
  74. (complete 30)
  75.  
  76. (copyfiles
  77.     (source (tackon #source-dir "Libs"))
  78.     (dest (tackon @default-dest "Libs"))
  79.     (all)
  80. )
  81.  
  82. (complete 50)
  83.  
  84. (copyfiles
  85.     (source (tackon #source-dir "Rexx"))
  86.     (dest (tackon @default-dest "Rexx"))
  87.     (all)
  88. )
  89.  
  90. (complete 60)
  91.  
  92. (copyfiles
  93.     (source (tackon #source-dir "Charon"))
  94.     (dest @default-dest)
  95. )
  96.  
  97. (if (= #ToolbarType 0)
  98.     (copyfiles
  99.         (source (tackon #source-dir "Charon.info"))
  100.         (dest @default-dest)
  101.     )
  102. ;else
  103.     (
  104.         (copyfiles
  105.             (source (tackon #source-dir "CharonProp_info"))
  106.             (dest @default-dest)
  107.             (newname "Charon.info")
  108.         )
  109.         (copyfiles
  110.             (source (tackon #source-dir "Images/About"))
  111.             (dest (tackon @default-dest "Images"))
  112.         )
  113.     )
  114. )
  115.  
  116. (complete 80)
  117.  
  118. (copyfiles
  119.     (source #ImageDir)
  120.     (dest (tackon @default-dest "Images"))
  121.     (all)
  122. )
  123.  
  124. (complete 100)
  125.  
  126. (exit "Installation finished successfully. Enjoy using Charon!")
  127.